package lib.bone.nepudata.domain.dto.topic;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author: kindear
 */
@Deprecated
@Data
@ApiModel(value = "纵向课题更新DTO")
public class NepuTopicUpdateDTO {

    @NotBlank(message = "纵向课题ID不可为空")
    @ApiModelProperty(value = "纵向课题ID",name = "id")
    String id;



    /**
     * 对应课题ID 对应 nepu_topic_dict 中的 ID
     * 可以使用级联合 多对一 # 暂不使用
     */
    @NotBlank(message = "词典ID不可为空")
    @ApiModelProperty(value = "对应课题类型ID",notes = "")
    String topicDictId;

    @NotBlank(message = "纵向课题名称不可为空")
    @ApiModelProperty(value = "纵向课题名称",notes = "")
    String topicName;

    /**
     * 课题编码
     */
    @NotBlank(message = "课题编码不可为空")
    @ApiModelProperty(value = "课题编码",notes = "")
    String topicCode;


    @Min(value = 0,message = "课题经费不少于于0")
    @ApiModelProperty(value = "课题经费",notes = "")
    Double topicFunds;

    @Min(value = 0,message = "已到账经费不少于于0")
    @ApiModelProperty(value = "已到账经费",notes = "")
    Double receivedFunds;

    /**
     * 纵向课题负责人姓名
     */
    @NotBlank(message = "负责人姓名不可为空")
    @ApiModelProperty(value = "纵向课题负责人",notes = "")
    String leader;



    /**
     * 纵向课题负责人ID
     */
    @NotNull(message = "负责人ID不可为空")
    @ApiModelProperty(value = "纵向课题负责人ID",notes = "")
    Long leaderId;

    /**
     * 纵向课题成员ID列表
     */
    @NotEmpty(message = "参与成员ID列表不可为空")
    @ApiModelProperty(value = "纵向课题成员ID列表",notes = "")
    List<Long> userIdList;


    @ApiModelProperty(value = "指定部门ID")
    Long deptId;

    @ApiModelProperty(value = "指定部门名称")
    String deptName;

    @NotNull(message = "是否延期不可为空")
    @ApiModelProperty(value = "是否延期",notes = "")
    Integer isDelay;

    /**
     * 纵向课题执行年限
     */

    @ApiModelProperty(value = "课题立项日期",notes = "课题立项日期，如2021/11/16")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date buildDate;

    @ApiModelProperty(value = "课题执行日期",notes = "课题执行日期，如2021/11/16")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date startDate;


    @ApiModelProperty(value = "课题结束日期",notes = "合同开始日期，如2021/11/16")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date endDate;


    //@NotEmpty(message = "关联文件不可为空")
    @ApiModelProperty(value = "关联文件ID列表")
    List<String> fileIds;

    @NotNull(message = "工作量不可为空")
    @ApiModelProperty(value = "工作量",notes = "")
    Integer workload;

}
